<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>test</title>
<style type="text/css">@import url(../../README.css);</style>
<script type="text/javascript" src="http://uupaa-js-spinoff.googlecode.com/svn/trunk/uupaa-detect.js/uupaa-detect.mini.js"></script>
<script type="text/javascript" src="http://uupaa-js-spinoff.googlecode.com/svn/trunk/uupaa-mutationevent.js/uupaa-mutationevent-lite.mini.js"></script>
<script type="text/javascript" src="../../uupaa-selector.js"></script>
</head>
<body>
<div>
<p>上から3つをシルバーに</p>
 <ul>
  <li>list1</li>
  <li>list2</li>
  <li>list3</li>
  <li>list4</li>
 </ul>
</div>
<script>
window.onload = function() {
  uu.css("div ul>li:nth-child(-n+3)").forEach(function(v) {
   v.style.backgroundColor = "silver";
  });
}
</script>
<pre class="eg">
&lt;div&gt;
 &lt;ul&gt;
  &lt;li&gt;list1&lt;/li&gt;
  &lt;li&gt;list2&lt;/li&gt;
  &lt;li&gt;list3&lt;/li&gt;
  &lt;li&gt;list4&lt;/li&gt;
 &lt;/ul&gt;
&lt;/div&gt;

uu.css("div ul&gt;li:nth-child(-n+3)").forEach(function(v) {
 v.style.backgroundColor = "silver";
});
</pre>
</body>
</html>
